<?php
/**
 * Created by PhpStorm.
 * User: R.Ice
 * Date: 2018/8/23
 * Time: 9:49
 * name:新增教室
 * url:/erpSchoolClassroom/add_classroom
 */

$oc_name         = $route->bodyParams['oc_name'];                           //教室名称
$oc_category     = $route->bodyParams['oc_category'];                       //教室类别，以|隔开
$oc_limit_number = $route->bodyParams['oc_limit_number'];                   //限座人数
$oc_weekday 	 = $route->bodyParams['oc_weekday_frequency'];              //周内使用频
$oc_weekend 	 = $route->bodyParams['oc_weekend_frequency'];              //周末使用频
$oc_frequency	 = $route->bodyParams['oc_frequency'];                      //频次
$oc_oesid        = $route->bodyParams['oc_oesid'];                          //企业id
$oc_note         = $regexpObj->bodyV($response,$route,'oc_note','NORMAL');  //备注信息
$is_view         = $regexpObj->bodyV($response,$route,'is_view','NORMAL');

//写入数组
$insertArr = [
    'oc_name'          	   =>$oc_name,
    'oc_category'      	   =>$oc_category,
    'oc_limit_number' 	   =>$oc_limit_number,
    'oc_oesid'         	   =>$oc_oesid,
    'oc_note'          	   =>$oc_note,
    'oc_weekday_frequency' =>$oc_weekday,
    'oc_weekend_frequency' =>$oc_weekend,
    'oc_frequency'         =>$oc_frequency,
    'is_view'              =>$is_view,
    'oc_create_time'  	   =>time(),
];
//执行写入语句
$rsData = $db->mysqlDB->insert("oa_classroom",$insertArr);

//返回成功结果
$response->responseData( true, $rsData );